package com.xiangge.abstract1;

import com.xiangge.domain.Triangle;

public class AbstractTest4 {
    public static void main(String[] args) {
        Triangle triangle1 = new Triangle(3,4,5);
        Triangle triangle2 = new Triangle(3,4,3);

        System.out.println(triangle1);
        System.out.println(triangle2);
        System.out.println("三角形1的面积是：" + triangle1.getArea());
        System.out.println("三角形1的周长是：" + triangle1.getPerimeter());
        System.out.println("三角形2的面积是：" + triangle2.getArea());
        System.out.println("三角形2的周长是：" + triangle2.getPerimeter());

        System.out.println("两个三角形是否相同：" + triangle1.equals(triangle2));
    }
}
